#include <vector>
#include <iostream>

using namespace std;

/*
创建一个有 target + 1 个元素的数组 results，它们的初始值都是 0
[0, 0, 0, 0, 0, 0]
*/
int makeChange(vector<int> coins, int target) {
  vector<int> results(target + 1, 0);
  results[0] = 1;

  for (int coin : coins) {
    for (int i = 1; i < target + 1; ++ i) {
      if (coin <= i) {
        results[i] = results[i] + results[i - coins];
      }
    }
  }

  return results.back();
}


int main(int argc, char const *argv[])
{
  /* code */
  return 0;
}
